1. Field of the Invention
The present invention relates to a pattern masking method and an apparatus therefor employed for pattern defect inspection, and more particularly, it relates to a pattern masking method and an apparatus therefor employed for inspecting printed wiring boards having through-holes.
2. Description of the Prior Art
In pattern defect inspection of printed wiring boards or the like, pattern defects are mainly detected through a pattern matching method and a feature extraction method nowadays. In the former method, image patterns of inspected objects are overlapped with the image pattern of a reference object to be compared with the same, thereby to judge that mismatched parts are defective (for example, refer to Japanese Patent Publication Gazette No. 2069/1984 and Japanese Patent Laying-Open Gazette No. 61604/1985. In the latter method, various features such as line width, angle, specific pattern etc. included in a reference image pattern are stored so that, when a pattern belonging to none of the said features is detected in an inspected image, the said pattern is judged to be defective (for example, refer to Japanese Patent Laying-Open Gazette No. 149905/1982).
In the pattern defect detection through the said pattern matching, however, a problem is caused in defect detection of printed wiring boards having through-holes such as those of double-layer structure, although no such problem is caused in defect detection of printed wiring boards having no through-holes such as inner layer wiring boards provided on inner layers of multilayer structure. In case of the printed wiring boards having through-holes, positions of the through-holes are generally varied by about 100 .mu.m with misregistration in set positions of the printed wiring boards and that of drill edges in formation of the through-holes. Misregistration of the through-holes causes no practical problem in such a range of variation. However, when image patterns of inspected objects are overlapped with that of a reference object for comparison, the patterns are mismatched at the through-hole positions, whereby the said positions are judged to be defective even if land patterns and lead wire patterns are matched with each other. Thus, pattern defects of the printed wiring boards having through-holes cannot be correctly detected by the conventional pattern matching method and the defects must be visually detected after formation of the through-holes, whereby pattern defect detection is extremely complicated and detection accuracy is varied with inspectors.